"""
   # File : FileControl.py
   # Time : 2021/12/13
   # Author : XGT
   # Version : V1.0.0
   # Description : 用于将存放测试数据的文件夹下的excel表格进行全部获取
"""

import os
from Control import ExcelControl


def get_excel_file():
    """
       :F: 用于存放每个表格的测试数据
       :note: 可将os.walk()中的参数设置成参数
    """
    F = []
    for path, dir, files in os.walk(r'../Test_Data/'):
        for file in files:
            excel_path = path +file
            s = os.path.splitext(file)[1]
            if s == '.xlsx':
                F.append(ExcelControl.write_Test_Data(excel_path))
            else:
                print('该文件无法识别，文件名称'+file)
        return F



if __name__ == '__main__':
    print(get_excel_file())